package com.servlet;


import java.sql.Connection;

import hyl.core.Amy;
import hyl.core.db.MyDB;

public class My extends Amy {
	protected static My my  = new My();
	private My() {	
	}
	public static My getInstance() {
		return my;
	}
	private synchronized static Connection getDBConn1() {
		
		//创建一个连接
		return dbpool.getConnection("mysql1");
	}

	public synchronized static MyDB getDb1() {
		//通过连接创建DB对象 操作sql
		return MyDB.createDB(getDBConn1());
	}

}
